<extend name="Base/base" />
<block name='head'>  
    <meta charset="utf-8">
    <link rel="stylesheet" href="/Public/Admin/css/personal.css"/>
    <style type="text/css">
        .t4{color:#bbb}
        .weui_cell{height:35px;line-height: 35px}
        .weui_cell p{font-size: 14px}

        /*出差小结－转交下一步骤开始*/
        .trip_next h3 {
            font-weight:bold;
            font-size:16px;
        }
        .trip_next span.t1,.select_next .t3 {
            color:#36C;
        }
        .trip_next span.t2, .trip_next p.t3 {
            color:#F00;
        }
        .select_next {
            font-size:14px;
            margin:20px 0;

        }
        .trip_next p a {
            color:#36c;
            text-decoration:underline;
        }
        .trip_next p img {
            margin-left:0.5em;
        }
        .select_people {
            margin:50px 10px 30px 10px;
        }
        .select_people .dd {
            background: #437dba;
            border: none;
            text-align: center;
            cursor: pointer;
            padding: 8px;
            width:6em;
            -moz-border-radius: 4px;
            -webkit-border-radius: 4px;
            border-radius: 4px;
            margin-right:0.8em;
            float:left;
            margin-bottom:1em;
        }
        .select_people .dd a {
            color:#fff;
        }
        .select_people .qk {
            float:left;
            margin-top:15px;
        }
        .select_people a {
            color:#36c;
        }


        .operator .people span{margin-right: 0.5em}
        /*出差小结－转交下一步骤结束*/
        .endFlow{display: inline-block;padding:0.3em 0.8em;text-align: center;background:#437dba;color:#fff;margin-top:1em}
    </style>
</block>
<block name="content" > 
    <section class="layui-larry-box">
        <div class="larry-personal">
            <div class="layui-tab">
                <p class="nav-title">
                    <!--<a class="newsAdd_btn" title="返回" href="javascript:history.go(-1)"><img src="/Public/Admin/images/back.png" /></a>-->
                    <a href="{:U('Flow/lists')}"><span>我的流程</span></a> &nbsp;> &nbsp;
                    <a href="{:U('Flow/form',array('id'=>$form_id))}"><span>流程表单</span></a> &nbsp;> &nbsp;流程转交
                </p>
                <form>
                    <div class="bd">
                        <div class="work_cells trip_next">
                            <div class="weui_cell">
                                <h3>流水号{$runs.run_id}-{$runs.flow_name}（{$runs.begin_time}）</h3>
                            </div>
                            <foreach name="runs.step" item="step">
                                <if condition="$step['user'] neq null">
                                    <div class="weui_cell">
                                        <p class="t3">第{$step.prcs_id}步：（当前步骤）{$step.prcs_name}&nbsp;&nbsp;
                                        <foreach name='step.user' item='user'>
                                            <if condition="$user['prcs_flag'] eq 2">
                                                <span class="t1" style="color:green">{$user.user_id|getChineseName}（办理中） </span>
                                                <elseif condition="$user['prcs_flag'] == 3 || $user['prcs_flag'] ==4"/>
                                                <span class="t1" style="color:blue">{$user.user_id|getChineseName}（已完结） </span>
                                            </if>
                                        </foreach>
                                        </p>
                                    </div>
                                    <else/>
                                    <div class="weui_cell">
                                        <p>第<span class="t2">{$step.prcs_id}</span>步：{$step.prcs_name}</p>
                                    </div>
                                </if>
                            </foreach>
                        </div>
                        <div class="select_next">
                            <p>选择下一步骤</p>  
                            <notempty name="nexts">
                                <foreach name='nexts' item='next'>
                                    <if condition="$next['one'] neq false">
                                        <a class="checkDept" data-id="{$next.prcs_id}" data-name="{$next.prcs_name}">
                                            <if condition="$flag eq 1">
                                                <img src="/Public/Index/img/s1.png" style="width:20px;">
                                                <input name="prcs_type" type="hidden" value="1" data-url="{:U('getFlowUser',array('flow_id'=>$flow_id,'prcs_id'=>$next['prcs_id'],'run_id'=>$run_id,'auto_type'=>$auto_type))}" />
                                                <input type="hidden" id="prcs_id_html" value="{$next.prcs_id}">
                                                <input type="hidden" id="prcs_name_html" value="{$next.prcs_name}">
                                                <input type="hidden" id="prcs_url_html" value="{:U('getFlowUser',array('flow_id'=>$flow_id,'prcs_id'=>$next['prcs_id'],'run_id'=>$run_id,'auto_type'=>$auto_type))}">
                                                <else/>
                                                <img src="/Public/Index/img/s2.png" style="width:20px;">
                                                <input name="prcs_type" type="hidden" value="0" data-url="{:U('getFlowUser',array('flow_id'=>$flow_id,'prcs_id'=>$next['prcs_id'],'run_id'=>$run_id,'auto_type'=>$auto_type))}" />
                                            </if>
                                            <label class="t3">{$next.prcs_name} </label></a><br/>
                                        <else />
                                        <a class="checkDept">
                                            <label class="t4">{$next.prcs_name}（条件不满足） </label></a><br/>
                                    </if>
                                </foreach>
                                <else/>
                                <span class="pointer endFlow" data-url="{:U('overFlow')}">结束流程</span>
                            </notempty>
                        </div>
                        <div class="work_cells trip_next checkuser">
                            <div class="weui_cell">
                                <h3 class="stepName"></h3>
                                <input type='hidden' name="prcs_id" id='prcs_id' value='' /> 
                                <input type='hidden' name="flow_id" id='flow_id' value='{$flow_id}'/> 
                                <input type='hidden' name="run_id" id='run_id' value='{$run_id}'/>
                                <input type='hidden' name="form_id" id='form_id' value='{$form_id}'/>
                                <input type='hidden' name="auto_type" id='auto_type' value='{$auto_type}'/>
                                <input type="hidden" name="over_user" id="over_user" value="{$current_user}">
                                <!--结束流程专用prcs_id-->
                                <input type='hidden' name="over_prcs_id" value='{$prcs_id}'/> 
                            </div>

                            <div class="weui_cell operator">

                            </div>      
                            <notempty name="nexts">
                                <div class="select_people">
                                    <div class="checkUser dd"><a>选择人员</a></div> 
                                    <div class="qk"> <a class="pointer empty1 clear-user">清空</a></div>
                                </div>    
                            </notempty>
                        </div>
                        <p style="clear:both"></p>
                        <notempty name="nexts">
                            <div class="layui-form-item">
                                <div class="layui-input-block button">
                                    <a class="layui-btn pointer sure btn-submit ajax-post" data-verify="all" data-url="{:U('nextStep')}" data-form="">确认转交</a>
                                    <a class="layui-btn pointer back btn-submit"  onclick="history.go(-1)">返回</a>
                                </div>
                            </div>
                        </notempty>
                    </div>
                </form>
                <input type="hidden" id="url" value="{:U('getRunData',array('run_id'=>$run_id))}">
                <input type="hidden" id="operatorUrl" value="{:U('delOperator')}">
                <input type="hidden" id="feedbackUrl" value="{:U('getRunData',array('type'=>'feedback','run_id'=>$run_id))}">
            </div>
        </div>
    </section>
</block>
<block name="script">
    <script type="text/javascript" src="/Public/Admin/js/flow.js"></script>
    <script type="text/javascript" src="/Public/Admin/js/common.js" ></script>
    <script type="text/javascript">
     $(adminFlowStep())

    </script>
</block>
